home *** CD-ROM | disk | FTP | other *** search
Wrap
function randRange(min, max) { var _loc1_ = Math.floor(Math.random() * (max - min + 1)) + min; return _loc1_; } MovieClip.prototype.bounceIn = function(delay, callback) { this._visible = false; xFinish = this._x; yFinish = this._y; rotFinish = this._rotation; this._xscale = 0; this._yscale = 0; this._visible = true; var startTime = getTimer(); this.onEnterFrame = function() { currentTime = getTimer(); if(currentTime >= startTime + delay) { this.gotoAndPlay(2); var _loc3_ = new mx.transitions.Tween(this,"_xscale",mx.transitions.easing.Elastic.easeOut,0,100,1,true); var _loc2_ = new mx.transitions.Tween(this,"_yscale",mx.transitions.easing.Elastic.easeOut,0,100,1,true); xtween.onMotionFinished = callback; delete this.onEnterFrame; } }; }; MovieClip.prototype.bounceFinal = function(delay, callback) { this._visible = false; xFinish = this._x; yFinish = this._y; rotFinish = this._rotation; this._xscale = 0; this._yscale = 0; this._visible = true; var startTime = getTimer(); this.onEnterFrame = function() { currentTime = getTimer(); if(currentTime >= startTime + delay) { var _loc3_ = new mx.transitions.Tween(this,"_xscale",mx.transitions.easing.Elastic.easeOut,0,100,1,true); var _loc2_ = new mx.transitions.Tween(this,"_yscale",mx.transitions.easing.Elastic.easeOut,0,100,1,true); xtween.onMotionFinished = callback; delete this.onEnterFrame; } }; }; MovieClip.prototype.bounceBtnIn = function(amount) { var _loc3_ = new mx.transitions.Tween(this,"_xscale",mx.transitions.easing.Elastic.easeOut,this._xscale,amount,1,true); var _loc2_ = new mx.transitions.Tween(this,"_yscale",mx.transitions.easing.Elastic.easeOut,this._yscale,amount,1,true); }; MovieClip.prototype.bounceBtnOut = function() { var _loc3_ = new mx.transitions.Tween(this,"_xscale",mx.transitions.easing.Elastic.easeOut,this._xscale,90,1,true); var _loc2_ = new mx.transitions.Tween(this,"_yscale",mx.transitions.easing.Elastic.easeOut,this._yscale,90,1,true); }; MovieClip.prototype.bounceOut = function(delay, callback) { this._visible = false; var _loc3_ = this._x; var _loc2_ = this._y; var _loc6_ = this._rotation; this._xscale = 100; this._yscale = 100; this._visible = true; var startTime = getTimer(); this.onEnterFrame = function() { currentTime = getTimer(); if(currentTime >= startTime + delay) { var _loc3_ = new mx.transitions.Tween(this,"_xscale",mx.transitions.easing.Elastic.easeOut,100,0,1.5,true); var _loc2_ = new mx.transitions.Tween(this,"_yscale",mx.transitions.easing.Elastic.easeOut,100,0,1.5,true); xtween.onMotionFinished = callback; delete this.onEnterFrame; } }; }; MovieClip.prototype.fadeOut = function(delay, callback) { this._alpha = 100; var startTime = getTimer(); this.onEnterFrame = function() { currentTime = getTimer(); if(currentTime >= startTime + delay) { var _loc2_ = new mx.transitions.Tween(this,"_alpha",mx.transitions.easing.Regular.easeOut,100,0,1.5,true); _loc2_.onMotionFinished = function() { this._visible = false; this._alpha = 100; callback; }; delete this.onEnterFrame; } }; }; MovieClip.prototype.slide = function(delay, callback) { this._visible = false; var xFinish = this._x; this._x = Stage.width + this._width; this._visible = true; var startTime = getTimer(); this.onEnterFrame = function() { currentTime = getTimer(); if(currentTime >= startTime + delay) { var _loc2_ = new mx.transitions.Tween(this,"_x",mx.transitions.easing.Elastic.easeOut,this._x,xFinish,1,true); _loc2_.onMotionFinished = callback; delete this.onEnterFrame; } }; }; ScaleRange = 350; ScaleMin = 150; Rotation = Math.random() * 4; angle = 0; angleRate = 0.1; max = 12; vx = randRange(- max,max); vy = randRange(- max,max); rot = randRange(-2,2); mouseX = _root._xmouse; mouseY = _root._ymouse; oldMouseX = mouseX; oldMouseY = mouseY; totalWidth = preloader_mc.percentbar_mc._width; preloader_mc.percentbar_mc._width = 0; preloader_mc.kPercent.text = "0%"; preloader_mc.onEnterFrame = function() { var _loc4_ = _root.getBytesLoaded(); var _loc3_ = _root.getBytesTotal(); if(_loc3_ != -1) { var _loc6_ = Math.round(_loc4_ / 1024); var _loc5_ = Math.round(_loc3_ / 1024); percent = Math.round(_loc6_ / _loc5_ * 100); if(isNaN(percent)) { this.kPercent.text = "0%"; } else { this.kPercent.text = percent + "%"; this.percentbar_mc._width = totalWidth * (percent / 100); } if(_loc4_ == _loc3_ && _loc3_ > 0) { delete this.onEnterFrame; gotoAndStop("start"); play(); } else if(_loc4_ == -1) { failureReport_txt.text = "The file is not currently available. Please try again later. If you continue to receive this message, please contact the system administrator."; } } }; stop();